<?
	if (!empty($_REQUEST['user_roles_id'])) {
  	if (authorized('user_roles', 'delete', true)) {
			db_query("DELETE FROM user_roles WHERE id = {$_REQUEST['user_roles_id']}");
			db_query("DELETE FROM users_to_user_roles WHERE user_roles_id = {$_REQUEST['user_roles_id']}");
		} else warning('You do not have permission to delete roles');
	}
	
	location('/users/admin/roles/index');